﻿using ConfExpert.Forms.Base;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid;
using DevTeam;
using System;

namespace ConfExpert.Forms.SatinAlma
{
    public partial class SupheliFiyat : XForm
    {
        public SupheliFiyat()
        {
            InitializeComponent();
        }

        private void SupheliFiyat_Load(object sender, EventArgs e)
        {
            gridView1.Init("CheckKumasFiyat");

            GridFormatRule[] gridFormatRule = new GridFormatRule[1];
            FormatConditionRuleDataBar[] formatConditionRuleDataBar = new FormatConditionRuleDataBar[1];

            gridFormatRule[0] = new GridFormatRule();
            formatConditionRuleDataBar[0] = new FormatConditionRuleDataBar();
            gridFormatRule[0].Column = gridView1.Columns["TlFark"];
            formatConditionRuleDataBar[0].PredefinedName = "Yellow Gradient";
            gridFormatRule[0].Rule = formatConditionRuleDataBar[0];

            gridView1.FormatRules.AddRange(gridFormatRule);

            gridView1.FormatAsNumber(1, "kFiyat", "KonfMt", "YuklenenMt", "yFiyat", "TlFark");
            gridView1.Columns["kCurrencyId"].ColumnEdit =
            gridView1.Columns["yCurrencyId"].ColumnEdit = RI(Rp.Currency);
            gridView1.AddSummary();
            gridView1.BestFitColumns();
        }
    }
}
